package com.candy.th2;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Thread th=new MyThread("花木兰");
        th.start();
        System.out.println("如果停止运行，请输入：s");
        Scanner sc=new Scanner(System.in);
        String stopped=sc.next();
        if (stopped.trim().equalsIgnoreCase("s")){
            ((MyThread)th).setStopped(true);
        }
    }
}
